package com.example.springLearning.part3.controller;

import com.example.springLearning.part3.service.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/spring/part3")
public class FixedHelloWorldController2 {

    @RequestMapping(path = "fixedHi2", method = RequestMethod.GET)
    public String hi() {
        return "hello world, service is : " + getServiceImpl();
    }

    @Lookup
    public ServiceImpl getServiceImpl() {

        return null;
    }
}
